package com.sunshine.scw.base.dao.query;

/**
 * 迫切查询类
 * 
 * @author xiao
 * @version 1.0
 */
public class QueryFetchMode {

	public static final int DEFAULT = 1, JOIN = 2, SELECT = 3;

	/**
	 * 属性名
	 */
	private String property;

	/**
	 * 操作运算符
	 */
	private int ioperator;

	public QueryFetchMode() {
	}

	public QueryFetchMode(String property, int ioperator) {
		this.property = property;
		this.ioperator = ioperator;
	}

	/**
	 * 创建默认的迫切模式
	 */
	public static QueryFetchMode setDefault(String property) {
		return new QueryFetchMode(property, DEFAULT);
	}

	/**
	 * 创建连接的迫切模式
	 */
	public static QueryFetchMode setJoin(String property) {
		return new QueryFetchMode(property, JOIN);
	}

	public String getProperty() {
		return property;
	}

	public int getIoperator() {
		return ioperator;
	}

}
